Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODCanvas


SetPlatformCanvas

The SetPlatformCanvas method assigns the drawing structure for the specified graphics system to this canvas.

void SetPlatformCanvas (in ODGraphicsSystem g, 
                        in ODPlatformCanvas c);
g
A 16-bit value specifying the graphics system whose drawing structure you are setting. Valid graphics systems are platform dependent.
c
A 32-bit value identifying the graphics-system-specific drawing structure to assign to this canvas, or kODNULL to remove the drawing structure for a graphics system. Valid values for c are graphics-system-dependent.
DISCUSSION
On the Mac OS platform, the graphics system may be either QuickDraw (kODQuickDraw) or QuickDraw GX (kODQuickDrawGX). For QuickDraw, the platform canvas should be a QuickDraw graphics port (type GrafPtr); for QuickDraw GX, it should be a QuickDraw GX view port object (type gxViewPort).

You can assign any graphics-system-specific drawing structure that a part might use. On some platforms, a canvas can have drawing structures for two or more graphics systems simultaneously.

EXCEPTIONS
kODErrInvalidGraphicsSystem
This implementation of OpenDoc does not support the specified graphics system or that graphics system is not installed or available.
SEE ALSO
The ODGraphicsSystem type (page 883).
The ODCanvas::GetPlatformCanvas method (page 70).
The ODCanvas::HasPlatformCanvas method (page 74).
"Printing the Document" on page 174 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help